<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>
    <h3>变量渲染</h3>
    {{ . }}
    <p>{{.wzry}}</p>
    <p>{{index .wzry 0 }}</p>
    <p>{{index .wzry 1}}</p>
    <p>{{index .wzry 2}}</p>
    <p>{{.stuMap}}</p>
    <p>{{.stuMap.name}}</p>
    <p>{{.stuStruct}}</p>
    <p>{{.stuStruct.Name}}</p>


    <p>是否在线</p>
    <p>{{if eq .state "在线"}}
    <p>在线</p>
    <ul>
        {{ range $yingxiong := .wzry}}
        <li>{{ $yingxiong }}</li>
        {{end}}
    </ul>
    <p>{{else}}</p>
    <p>离线</p>
    {{end}}</p>
</body>

</html>